/*
 * @Author: wangtianyu wangtianyu@lierda.com
 * @Date: 2023-06-07 14:22:07
 * @LastEditors: wangtianyu wangtianyu@lierda.com
 * @LastEditTime: 2023-11-07 14:11:49
 * @FilePath: \kake_mcu_tool\Library\KK_gui\kkgui_cfg.h
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#ifndef __KKGUI_CFG_H__
#define __KKGUI_CFG_H__

#ifdef __cplusplus
extern "C" {
#endif
/* =============================== */
/* include */
#include "main.h"

#include "stdio.h"
#include "stdbool.h"
#include "string.h"
#include "math.h"
#include "kkgui_key.h"

/* =============================== */
/* define */
#define     DIS_HIGH      64
#define     DIS_WIDE      128

#define     KKUI_ERROR   0XFF
#define     KKUI_NONE    0XFF

#define     MENU_MENU_FONT_HIGH         12  // 菜单字体高度
#define     MENU_MENU_FONT_WIDTH        6   // 菜单字体宽度
#define     MENU_MENU_CURSOR_SIZE       16  // 菜单光标高度
#define     MENU_MENU_CURSOR_SHIFT      2   // (MENU_MENU_CURSOR_SIZE - MENU_MENU_FONT_HIGH) / 2
#define     MENU_MENU_BOTHSIDE_SHIFT    2   // 前后空余

#define     MENU_MENU_ICON_SIZE         32  // 菜单字体高度

#define     MENU_KEY_UP     (uiKeyGetValue(UI_KEY_LEFT_ID) == DOWN)
#define     MENU_KEY_DOWN   (uiKeyGetValue(UI_KEY_RIGHT_ID) == DOWN)
#define     MENU_KEY_LETF   (uiKeyGetValue(UI_KEY_LEFT_ID) == DOWN)
#define     MENU_KEY_REGHT  (uiKeyGetValue(UI_KEY_RIGHT_ID) == DOWN)
#define     MENU_KEY_ENTER  (uiKeyGetValue(UI_KEY_ENTER_ID) == DOWN)
#define     MENU_KEY_BACK   (uiKeyGetValue(UI_KEY_BACK_ID) == DOWN)

#define     MENU_INIT_INTER     0

/* =============================== */
/* typedef */
#ifndef uint8_t
typedef unsigned char       uint8_t;  
#endif 
#ifndef uint16_t
typedef unsigned short      uint16_t;  
#endif 
#ifndef uint32_t
typedef unsigned int        uint32_t;   
#endif


typedef void (*uiRefershCB)(void);


/* =============================== */
/* variable statement*/
void KKgui_log(const char *fmt, ...);


/* =============================== */
/* function statement*/
void uiGramInit(void);
void uiDisInit(uiRefershCB refs_fun);





#ifdef __cplusplus
}
#endif


#endif

